from typing import Tuple
from ..core.schemas import MCPServerConfig, ModelParameter, AgentConfig


openai_model_parameter= {
    "provider": "openai",
    "model": "qwen3:0.6b",
    "title": "qwen3:0.6b-openai-compatible",
    "base_url": "http://localhost:11434/v1",
    "api_key":"empty"
}

ollama_model_parameter= {
    "provider": "ollama",
    "model": "qwen3:0.6b",
    "title": "qwen3:0.6b-openai-compatible",
    "api_key":"empty"
}

mysql_mcp_config={
    "disabled": False,
    "timeout": 60,
    "url": "http://127.0.0.1:8100/sse",
    "transportType": "sse"
}

postgres_mcp_config={
    "disabled": False,
    "timeout": 60,
    "url": "http://127.0.0.1:8090/mcp",
    "transportType": "streamable-http"
}

def get_agent_config(mcp_server: str="mysql-mcp")->Tuple[str,AgentConfig]:
    """
    _mcp_server={
        "disabled": False,
        "timeout": 60,
        "url": "http://127.0.0.1:8090/mcp",
        "transportType": "streamable-http"
    }

    """
    if mcp_server == "postgres-mcp":
        return mcp_server, AgentConfig(
            mcp_config=MCPServerConfig(**postgres_mcp_config),
            model_parameter=ModelParameter(**ollama_model_parameter) 
        )
    else: pass

    return mcp_server, AgentConfig(
        mcp_config=MCPServerConfig(**mysql_mcp_config),
        model_parameter=ModelParameter(**openai_model_parameter) 
    )